﻿namespace PasswordGeneratorTests
{
    using System;
    using Microsoft.VisualStudio.TestTools.UnitTesting;
    using PasswordGenerator;

    /// <summary>
    /// Checks aspects of the password generator that does not depdend on the random source.
    /// </summary>
    [TestClass]
    public class PasswordGeneratorTest
    {
        [TestMethod]
        [ExpectedException(typeof(ArgumentException))]
        public void PasswordGenerator_PasswordTooSmall()
        {
            var target = new PasswordGenerator();
            target.PasswordLength = 5;

            string s = target.Generate();
        }

        [TestMethod]
        [ExpectedException(typeof(ArgumentException))]
        public void PasswordGenerator_NoCharacterClass()
        {
            var target = new PasswordGenerator();

            string s = target.Generate();
        }
    }
}
